import { Behaviour } from "../engine/Behaviour";
import { BitmapRenderer } from "../engine/BitmapRenderer";
import { string } from "../engine/validators/string";
import { binding, Binding, makeBinding } from "./Binding";

export class BackGroundBinding extends Binding {



    @string()
    @binding((prefabRoot, value) => {
        prefabRoot.children[0].getBehaviour(BitmapRenderer).source = value;
    })
    imageSource: string

    constructor() {
        super();
        makeBinding(this)
    }
}